﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web; 
using System.Configuration;
/// <summary>
/// Summary description for Connector
/// </summary>
public abstract class Connector
{
  // protected List<CatalogUser> Users;
   protected List<dynamic> Users;
   protected string Login;
   protected string Password;
   protected string[] SettingsProperties;

   protected void GetSettingsFromConfig()
   { 
       Login = ConfigurationManager.AppSettings["Login"];
       Password = ConfigurationManager.AppSettings["Password"]; 
   }
   protected void GetPropertiesFromConfig()
   {
       SettingsProperties = ConfigurationManager.AppSettings["Properties"].Split(';');
   }

   public abstract dynamic GetConnect();
   //public abstract List<CatalogUser> GetUsers();
   public abstract List<dynamic> GetUsers();
   public abstract void ChangeUserProperty(dynamic User, CatalogProperty[] Props);
  // public abstract List<CatalogUser> FindUsers(CatalogProperty[] Props);
   public abstract List<dynamic> FindUsers(CatalogProperty[] Props, bool OneEnough);
   public abstract dynamic FindUser(CatalogProperty[] Props, bool OneEnough);
   public abstract string CreateUser(CatalogProperty[] Props);
    //add something
   public abstract bool ChangePassword(dynamic User,string Password);
}